import Vue from 'vue'
import Router from 'vue-router'
import Main from '@/views/Main'
import StoreIndex from '@/views/store/StoreIndex'
import StoreCityIndex from '@/views/store/StoreCityIndex'
import StoreCityGoods from '@/views/store/StoreCityGoods'

import ProjectIndex from '@/views/project/ProjectIndex'
import ProjectList from '@/views/project/ProjectList'
import ProjectDetail from '@/views/project/ProjectDetail'

import ShopIndex from '@/views/shop/ShopIndex'
import ShopDetail from '@/views/shop/ShopDetail'

import MarketIndex from '@/views/market/MarketIndex'
import MarketDetail from '@/views/market/MarketDetail'

import TerminalIndex from '@/views/terminal/TerminalIndex'
import TerminalType from '@/views/terminal/TerminalType'
import TerminalDetail from '@/views/terminal/TerminalDetail'
import TerminalSearch from '@/views/terminal/TerminalSearch'

import OperationIndex from '@/views/operation/OperationIndex'
import OperationDetail from '@/views/operation/OperationDetail'

import ResourceIndex from '@/views/resource/ResourceIndex'
import ResourceOne from '@/views/resource/ResourceOne'
import ResourceDetail from '@/views/resource/ResourceDetail'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Main',
      component: Main
    },
    {
      path: '/store-index',
      name: 'StoreIndex',
      component: StoreIndex
    },
    {
      path: '/store-city-index/:comp_id',
      name: 'StoreCityIndex',
      component: StoreCityIndex
    },
    {
      path: '/store-city-goods/:comp_id/:code',
      name: 'StoreCityGoods',
      component: StoreCityGoods
    },
    {
      path: '/project-index',
      name: 'ProjectIndex',
      component: ProjectIndex
    },
    {
      path: '/project-list/:storecomp_code/:state/:year',
      name: 'ProjectList',
      component: ProjectList
    },
    {
      path: '/project-detail/:comp_id/:project_code',
      name: 'ProjectDetail',
      component: ProjectDetail
    },
    {
      path: '/shop-index',
      name: 'ShopIndex',
      component: ShopIndex
    },
    {
      path: '/shop-detail/:category_id/:comp_id/:type',
      name: 'ShopDetail',
      component: ShopDetail
    },
    
    {
      path: '/market-index',
      name: 'MarketIndex',
      component: MarketIndex
    },
    {
      path: '/market-detail/:comp_id',
      name: 'MarketDetail',
      component: MarketDetail
    },
    {
      path: '/terminal-index',
      name: 'TerminalIndex',
      component: TerminalIndex
    },
    {
      path: '/terminal-type/:comp_id/:goods_type/:type',
      name: 'TerminalType',
      component: TerminalType
    },
    {
      path: '/terminal-detail/:code/:goods_type/:type',
      name: 'TerminalDetail',
      component: TerminalDetail
    },
    {
      path: '/terminal-search/:imei',
      name: 'TerminalSearch',
      component: TerminalSearch
    },
    {
      path: '/operation-index',
      name: 'OperationIndex',
      component: OperationIndex
    },
    {
      path: '/operation-detail/:comp_id',
      name: 'OperationDetail',
      component: OperationDetail
    },
    {
      path: '/resource-index',
      name: 'ResourceIndex',
      component: ResourceIndex
    },
    {
      path: '/resource-one/:source',
      name: 'ResourceOne',
      component: ResourceOne
    },
    {
      path: '/resource-detail/:source/:code1-:code2-:code3',
      name: 'ResourceDetail',
      component: ResourceDetail
    },
  ]
})
